//
//  Consts.h
//  Register
//
//  Created by Mac on 13-8-19.
//  Copyright (c) 2013年 Mac. All rights reserved.
//

#ifndef Register_Consts_h
#define Register_Consts_h
/************************************ 新浪公用宏 *************************************************************/
#define kAppKey         @"2065981817"
#define kAppSecret      @"2e4681d6f06217abc9f7e0c8f287240c"
#define kRedirectURI    @"https://api.weibo.com/oauth2/default.html"
/************************************ 微信公用宏 *************************************************************/
#define kWXAppKey         @"wx2a22edf1be46e21b"
#define kWXAppSecret      @"f3dccc427300f1afeb270c335622ff73"
/************************************ 设备公用宏 *************************************************************/
/*iOS7.0以上的版本*/
#define IOS7_OR_LATER   ( [[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending )
/*iOS8.0以上的版本*/
#define IOS8_OR_LATER   ( [[[UIDevice currentDevice] systemVersion] compare:@"8.0"] != NSOrderedAscending )
/*是否是iPhone5*/
#define IPHONE5_OR_LATER ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
/*是否是iPhone6+*/

#define IPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

/*设备像素的宽度*/
#define IPHONE_WIDTH 320.f
/*设备的高度*/
#define IPHONE_HEIGHT 480.f
/*IPHONE5设备的高度*/
#define IPHONE5_HEIHT 568.f
/*系统屏幕的高*/
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
/*系统屏幕的宽*/
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
/************************************ 项目公用宏 *************************************************************/
/*首次启动判断*/
#define First_Launched @"firstLaunch"
/*监听网络的Key*/
#define kBrowMode @"kBrowMode"
/*判断字符串是否为空*/
#define StringIsNullOrEmpty(str) (str==nil||[str isEqualToString:@""])
/*字符串为空的时候不显示为nil,显示为空*/
#define TextString(str) [NSString stringWithFormat:@"%@",str]
/*间距*/
#define SPACING 10
/*1像素的间距*/
#define DividerSpacing 1
/*搜索的高度*/
#define SEARCHBAR_HEIGHT 40
/*状态栏的高度*/
#define STATEBAR_HEIGHT 20
/*自定义的UITabBar的高度*/
#define TABBAR_HEIGHT 49
/*iOS7以上的导航栏，高度为64*/
#define iOS7TopMargin 64
/*title的字体大小*/
#define LABEL_FONT_SIZE_TITLE ((kScreenWidth == 414)?15+2:15)
/*内容的字体大小*/
#define LABEL_FONT_SIZE_CONTENT ((kScreenWidth == 414)?14+2:14)
/*内容的字体大小13*/
#define LABEL_FONT_SIZE_CONTENT_13 ((kScreenWidth == 414)?13+2:13)
/*内容的字体大小10*/
#define LABEL_FONT_SIZE_CONTENT_10 ((kScreenWidth == 414)?10+2:10)


/*时间的字体大小*/
#define LABEL_FONT_SIZE_TIME ((kScreenWidth == 414)?10+2:10)
/*队列 需要用block使用宏GCD*/
#define MAIN(block) dispatch_async(dispatch_get_main_queue(),block)
/*rgb颜色转换（16进制->10进制*/
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
/*设置颜色RGB*/
#define COLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
/*清除背景颜色*/
#define CLEARCOLOR [UIColor clearColor]
/*定义UIImage对象*/
#define ImageNamed(_pointer) [UIImage imageNamed:_pointer]
/*可拉伸的图片*/
#define ResizableImage(name,top,left,bottom,right) [[UIImage imageNamed:name] resizableImageWithCapInsets:UIEdgeInsetsMake(top,left,bottom,right)]
#define VIEWWITHTAG(name, _TAG) [name viewWithTag : _TAG]
/*获得版本号*/
#define kVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
/*获得设备信息*/
#define kPlatform @"ios"
/*tabbar的背景颜色*/
#define TABBAR_BACKGROUNDCOLOR_16 @"#f8f8f8"
/*线的背景颜色*/
#define LINE_BACKGROUNDCOLOR_16 @"#e4e4e4"
/*页面的背景颜色*/
#define BACK_BACKGROUNDCOLOR_16 @"#f2f2f2"
/*tabbar的分割线*/
#define TABBAR_BACKDIVIDER @"#cbd7db"
/*导航条的背景颜色*/
#define NACIGATIONBAR_BACKGROUNDCOLOR_16 @"#4fc1e9"
/*文章标题字体颜色*/
//#define TITLE_ARTICLE_TEXTFONT_COLOR @"#393939"
#define TITLE_ARTICLE_TEXTFONT_COLOR [UIColor viewFlipsideBackgroundColor]

/*文章内容标题字体颜色*/
//#define TITLE_ARTICLE_CONTENTFONT_COLOR @"#717171"
/*时间字体颜色*/
#define TEXTFONT_TIME_COLOR @"#a2a8a9"

/*标题的字体大小*/
#define TITLE_TEXTLABEL_FOUNT_SIZE (kScreenWidth == 414)?15+2:15

/*button的字体大小*/
#define BUTTON_TEXTLABEL_FOUNT_SIZE (kScreenWidth == 414)?15+2:15
/*button的字体颜色*/
#define BUTTON_TEXTLABEL_FOUNT_COLOR @"#73c8ef"

#define kDidGetAndStoreMessageNotification             @"kDidGetAndStoreMessageNotification"
#define kDidGetAndStoreNewsNotification                @"kDidGetAndStoreNewsNotification"
#define kIsHaveNewsNoReaded                            @"kIsHaveNewsNoReaded"
#define kDidGetAndStoreNoticeNotification              @"kDidGetAndStoreNoticeNotification"
#define kDidGetAndStoreSystemNotification              @"kDidGetAndStoreSystemNotification"


/*自定义switch上的字号*/
#define DVSWITCH_YEXT_FONT  ((kScreenWidth == 414)?12+2:12)
/*自定义聊天气泡的字号*/
#define MESSAGE_TEXT_FONT  ((kScreenWidth == 414)?16+2:16)
/*提示弹窗的初始化*/
#define alertContent(content) \
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" \
                                                message:content \
                                               delegate:nil   \
                                      cancelButtonTitle:@"确定" \
                                      otherButtonTitles:@"取消",nil];  \
[alert show];
/**************************************  预编译  宏定义 *****************************************************/
/* 预编译  宏定义  判断是运行当前运行的是线上还是线下的服务器*/
#if 0 /*0是运行测试环境 1是运行线上服务器*/
#define HOST                           @"http://im.niruoanhao.com"
#define BaseMessageListDocIconHeadUrl  @"http://api.niruoanhao.com/docuser/avatar/?uid="
#define BaseMessageListIconHeadUrl     @"http://api.niruoanhao.com/user/avatar/?uid="
#define BaseMessageListIconTailUrl     @"&size=big&random=1"
#define KImgurl                        @"http://image.niruoanhao.com/"
#define kBaseURL                       @"http://api.niruoanhao.com/"
#define PORT                           @"1126"
#define isUserOnLine                   @"1"
#define kceshiVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]

#else
#define HOST                           @"http://118.194.163.40"
#define BaseMessageListDocIconHeadUrl  @"http://118.194.163.40/docuser/avatar/?uid="
#define BaseMessageListIconHeadUrl     @"http://118.194.163.40/user/avatar/?uid="
#define BaseMessageListIconTailUrl     @"&size=big&random=1"
#define KImgurl                        @"http://image.niruoanhao.com/"
#define kBaseURL                       @"http://118.194.163.40:100/"
#define PORT                           @"1127"
#define isUserOnLine                   @"0"
#define kceshiVersion @"1.220"

#endif
/*DEBUG_LOG 为0时不打印信息，1时打印*/
#define DEBUG_LOG 0
#if DEBUG_LOG
#define MyNSLog(fmt, args...) NSLog(@fmt, ##args)
#else
#define MyNSLog(fmt, args...)
#endif
#endif


//#define THREAD_RECOMMENT @"/thread/recommend/"//广场列表
/**
 *  圈子and广场
 */
#define THREAD_1 @"thread/"//帖子详情 /thread/1/

#define THREAD @"thread/"//帖子列表页面


#define GROUP_LIST @"group/list/"//获取圈子一二级列表
#define LOCAL_GROUP_LISTONE_key @"LOCAL_GROUP_LISTONE_key"//本地一级的key


#define GROUP_USER @"group/user/"//用户所选圈子

#define GROUP_BATCHUPDATE @"group/batchupdate/"//批量修改圈子关注

#define GROUP_BATCHDEL  @"group/batchdel/"//批量取消圈子关注

#define COLLECTION_ADDCOLLECTION  @"collection/addCollection/"//添加收藏

#define COLLECTION_DELETE @"collection/delete/"//删除收藏

#define THREAD_GOOD  @"thread/good/"//帖子点赞

#define POST_ @"post/"//用户回复主贴

#define POST_QUOTE @"post/quote/"//回复二楼

#define THREAD_LIST @"thread/list/"//帖子列表

#define THREAD_NEW @"thread/new/"//发表话题

#define THREAD_DELPIC @"thread/delpic/"//删除上传图片

#define USER_SIGN @"user/sign/"//用户签到

#define GROUP_CHANGEUSERGROUP @"group/changeusergroup/"//添加取消关注圈子

/**
 * 自查
 */
#define SYMPTOM_ @"symptom/"//自查首页分类
#define SYMPTOM_key @"SYMPTOM_key"//自查首页本地文件名字

#define WIKI_DEPARTMENT @"wiki/department/"//标准科室接口

#define SYMOTOM_DISEASE @"symptom/disease"//自查下获取疾病列

#define SYMOTOM_DISEASECOMMONCATEGORY @"symptom/diseaseCommonCategory/"//获取常见病列表

#define SYMOTOM_DISEASEBYCATID @"symptom/diseaseByCatid/"//获取常见分类下疾病列表
#define SHITU_SIMILARPIC @"shitu/similarpic/" //图片自查

#define SYMOPTOM_EME @"symptom/eme/" //获取急救列表接口

#define SYMOPTOM_EMEDETAIL @"symptom/emeDetail/" //获取急救内容详情接口

#define POST_MOREQUOTE @"post/morequote/"//获得更多回复

#define NOTIFICATION_PMLIST @"notification/pmlist/"//于我相关接口

#define AUTO_HOSPITAL @"auto/hospital/"//医院快速检索接口

#define AUTO_DRUG @"auto/drug/"//药品快速检索接口



/**
 *  文章你容字体颜色
 */
#define TITLE_ARTICLE_CONTENTFONT_COLOR [UIColor darkGrayColor]

/**
 *  时间字体颜色
 */
#define TIME_COLOR [UIColor lightGrayColor]

/**
 *  帖子标记背景色
 */

#define FLAG_BACKGROUNDCOLOR_16 @"#d4d4d4"











